package com.herench.bunch.lab.handler;

import com.herench.bunch.commons.annotation.Handler;
import com.herench.bunch.commons.support.AbstractMessageHandler;
import com.herench.bunch.lab.agent.LabOperationAgent;
import com.herench.bunch.lab.convert.LabRequestBillConvert;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Map;

/**
 * @author luoxiaoming on 18-10-16 下午12:03
 * @email luoxiaoming@herench.com
 */

@Handler(code = "300030", name = "检验申请单计费/退费" ,messageConvertClass = LabRequestBillConvert.class)
public class LabRequestBillHadler extends AbstractMessageHandler {

    @Autowired
    private LabOperationAgent labOperationAgent;

    @Override
    protected Object proxyInvoke(Object inMessage) throws Exception {
        Map<String,Object> params = (Map<String, Object>) inMessage;
        Map<String,Object> res = labOperationAgent.bill(params);
        return res;
    }

}
